﻿using AutoMapper;
using HamcoWcs.Entitys.Logs;
using HamcoWcs.Entitys.Logss;
using HamcoWcs.Entitys.MesMsgQueues;
using HamcoWcs.Models.Logss;

namespace HamcoWcs.Models.Logs
{
    public class LogProfile : Profile
    {
        public LogProfile()
        {
            //CreateMap<DeviceErrorLog, DeviceErrorLogDto>();
            //CreateMap<DeviceErrorLogDto, DeviceErrorLog>();

            CreateMap<DeviceMsgLog, DeviceMsgLogDto>();
            CreateMap<DeviceMsgLogDto, DeviceMsgLog>();

            CreateMap<LoginLog, LoginLogDto>();
            CreateMap<LoginLogDto, LoginLog>();

            CreateMap<SystemErrorLog, SystemErrorLogDto>();
            CreateMap<SystemErrorLogDto, SystemErrorLog>();

            CreateMap<WcsRunLog, WcsRunLogDto>();
            CreateMap<WcsRunLogDto, WcsRunLog>();

            CreateMap<MesMsgLog, MesMsgLogDto>();
            CreateMap<MesMsgQueue, MesMsgLogDto>();
            CreateMap<CommunicationLog, UICommunicationLog>();
            CreateMap<CommunicationLog, CommunicationLogBak>()
                .ForMember(dest => dest.Id, opt => opt.Ignore());

        }
    }
}
